﻿/** 
 * Copyright (c) 2001 University of Maryland, College Park, MD 20742, USA
 * Copyright (c) 2005 In4Arch
 *
 *  The MIT License
 *  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
 *  software and associated documentation files (the "Software"), to deal in the Software 
 *  without restriction, including without limitation the rights to use, copy, modify, merge, 
 *  publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 
 *  to whom the Software is furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all copies 
 *  or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
 *  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
 *  CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
 *  OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Benjamin B. Bederson and Martin Wattenberg 2001 
 * http://www.cs.umd.edu/hcil/treemap-history/index.shtml
 * 
 * Author: moedusa moedusa@gmail.com 2005
 * http://moedusa.name/
 *
 * Author: Nikita Shlyakhov shlyakhov@mail.ru 2006
 **/

 
import in4arch.alg.treemap.Rect; 
import in4arch.alg.treemap.MapModel;

/**
 *
 * The interface for all treemap layout algorithms.
 * If you write your own algorith, it should conform
 * to this interface.
 * 
 * <p>IMPORTANT: if you want to be able to automatically plug 
 * your algorithm into the various demos and test harnesses
 * included in the treemap package, it should have
 * an empty constructor.</p>
 * 
 * <p>IMPORTANT: well, it is important, you know. thos mathematics told ya
 * that ya must provide em with an empty constructor, u know, so u must, 
 * u know. </p>
 */
interface in4arch.alg.treemap.MapLayout{
	
    /**
     * Arrange the items in the given MapModel to fill the given rectangle.
     *
     * @param model The MapModel.
     * @param bounds The boundsing rectangle for the layout.
     */
    function layout(model:MapModel, bounds:Rect):Void;
    
    /**
     * Return a human-readable name for this layout;
     * used to label figures, tables, etc.
     *
     * @return String naming this layout.
     */
    function getName():String;
    
    /**
     * Return a longer description of this layout;
     * Helpful in creating online-help,
     * interactive catalogs or indices to lists of algorithms.
     *
     * @return String describing this layout.
     */
    function getDescription():String;
	
}